export default {
  computed: {
    // 表格中列字段
    columns() {
      return [
        {
          key: "sf_code",
          title: {
            "zh-CN": "参数编码",
            "en-US": "sf_code",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
        },
        {
          key: "sf_name",
          title: {
            "zh-CN": "参数名称",
            "en-US": "sf_name",
          }[this.G_Locale],
          minWidth: 200,
          align: "center",
          show: true,
        },
        {
          key: "sf_category",
          title: {
            "zh-CN": "参数分类",
            "en-US": "sf_category",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
          config: {
            type: "select",
            options: this.paramCategoryOptions,
            disabled: true,
          },
        },
        {
          key: "status",
          title: {
            "zh-CN": "状态",
            "en-US": "status",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
          config: {
            type: "select",
            options: this.statusOptions,
            disabled: true,
          },
        },
        {
          key: "unit",
          title: {
            "zh-CN": "参数单位",
            "en-US": "unit",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
        },
        {
          key: "itemType",
          title: {
            "zh-CN": "参数类型",
            "en-US": "itemType",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
          config: {
            type: "select",
            options: this.paramTypeOptions,
            disabled: true,
          },
        },
        {
          key: "standard",
          title: {
            "zh-CN": "标准值",
            "en-US": "standard",
          }[this.G_Locale],
          minWidth: 200,
          align: "center",
          show: true,
        },
        {
          key: "min",
          title: {
            "zh-CN": "区间最小值",
            "en-US": "min",
          }[this.G_Locale],
          minWidth: 150,
          align: "center",
          show: true,
        },
        {
          key: "max",
          title: {
            "zh-CN": "区间最大值",
            "en-US": "max",
          }[this.G_Locale],
          minWidth: 150,
          align: "center",
          show: true,
        },
        {
          key: "remark",
          title: {
            "zh-CN": "备注",
            "en-US": "remark",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          show: true,
        },
        {
          key: "createdBy",
          title: {
            "zh-CN": "创建人账号",
            "en-US": "created by",
          }[this.G_Locale],
          minWidth: 200,
          align: "center",
          show: true,
        },
        {
          key: "createTime",
          title: {
            "zh-CN": "创建时间",
            "en-US": "create time",
          }[this.G_Locale],
          minWidth: 200,
          align: "center",
          show: true,
        },
        {
          key: "updatedBy",
          title: {
            "zh-CN": "修改人账号",
            "en-US": "updated by",
          }[this.G_Locale],
          minWidth: 200,
          align: "center",
          show: true,
        },
        {
          key: "updateTime",
          title: {
            "zh-CN": "修改时间",
            "en-US": "update time",
          }[this.G_Locale],
          minWidth: 200,
          align: "center",
          show: true,
        },
      ];
    },
    // form中列字段
    formColumns() {
      return [
        {
          key: "sf_code",
          title: {
            "zh-CN": "参数编码",
            "en-US": "sf_code",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "sf_name",
          title: {
            "zh-CN": "参数名称",
            "en-US": "sf_name",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "sf_category",
          title: {
            "zh-CN": "参数分类",
            "en-US": "sf_category",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "select", options: this.paramCategoryOptions },
        },
        {
          key: "status",
          title: {
            "zh-CN": "状态",
            "en-US": "status",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "select", options: this.statusOptions },
        },
        {
          key: "unit",
          title: {
            "zh-CN": "参数单位",
            "en-US": "unit",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "itemType",
          title: {
            "zh-CN": "参数类型",
            "en-US": "itemType",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "select", options: this.paramTypeOptions },
        },
        {
          key: "standard",
          title: {
            "zh-CN": "标准值",
            "en-US": "standard",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text", disabled: false },
        },
        {
          key: "min",
          title: {
            "zh-CN": "区间最小值",
            "en-US": "min",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text", disabled: false },
        },
        {
          key: "max",
          title: {
            "zh-CN": "区间最大值",
            "en-US": "max",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text", disabled: false },
        },
        {
          key: "remark",
          title: {
            "zh-CN": "备注",
            "en-US": "remark",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "textarea" },
        },
      ];
    },
    queryFormItem() {
      return [
        {
          key: "sf_code",
          title: {
            "zh-CN": "参数编码",
            "en-US": "sf_code",
          }[this.G_Locale],
          config: {
            type: "text",
          },
        },
        {
          key: "sf_name",
          title: {
            "zh-CN": "参数名称",
            "en-US": "sf_name",
          }[this.G_Locale],
          config: {
            type: "text",
          },
        },
      ];
    },
    collapseFormItem() {
      return [
        {
          key: "sf_code",
          title: {
            "zh-CN": "参数编码",
            "en-US": "sf_code",
          }[this.G_Locale],
          config: {
            type: "text",
          },
        },
        {
          key: "sf_name",
          title: {
            "zh-CN": "参数名称",
            "en-US": "sf_name",
          }[this.G_Locale],
          config: {
            type: "text",
          },
        },
      ];
    },
    lang() {
      return {
        "en-US": {
          cancel: "cancel",
          confirmDelete: "confirm delete?",
        },
        "zh-CN": {
          cancel: "取消",
          confirmDelete: "确认删除？",
        },
      }[this.G_Locale];
    },
  },
};
